﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CourseSelectionSystem
{
    public partial class AddTeacher : Form
    {
        private readonly CourseSelectionSystemServices service = new CourseSelectionSystemServices();
        public AddTeacher()
        {
            InitializeComponent();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            CreateModelt modelt = new CreateModelt()
            {
                ID = textID.Text,
                Name = textName.Text,
                Title = textTitle.Text,
                Password = textPassword.Text,
            };
            service.Createt(modelt);
            this.DialogResult = DialogResult.OK;
            this.Close();
        }
    }
}
